﻿Option Strict On

Imports System.Windows.Forms

Namespace QuickEdit

    Public Class TextBoxFormater

        Private _textBoxen() As List(Of TextBox)
        Private WithEvents _formatForm As FormatForm


        Public Sub New()

        End Sub

        Public Sub RegisterTextBox(ByVal tb As TextBox)
            'AddHandler tb.Enter, AddressOf EnterEventHandler
            'AddHandler tb.Leave, AddressOf LeaveEventHandler
        End Sub

        Private Sub EnterEventHandler(ByVal sender As Object, ByVal e As EventArgs)
            _formatForm = New FormatForm
            _formatForm.Show(CType(sender, TextBox))
        End Sub

        Private Sub LeaveEventHandler(ByVal sender As Object, ByVal e As EventArgs)
            _formatForm.Dispose()
        End Sub

    End Class

End Namespace
